package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * SysApproveLevel generated by hbm2java
 */
@Entity
@Table(name="sys_approve_level"
    ,catalog="lmis"
)
public class SysApproveLevel  implements java.io.Serializable {


     private Short approvedLevelNo;
     private SysUserRole sysUserRole;
     private String approvedLevelDescr;
     private Short approvedLevelVal;
     private Set<SaleLoanContract> saleLoanContracts = new HashSet<SaleLoanContract>(0);
     private Set<SysApproveLevelRateVehicleType> sysApproveLevelRateVehicleTypes = new HashSet<SysApproveLevelRateVehicleType>(0);
     private Set<SysApproveLevelRate> sysApproveLevelRates = new HashSet<SysApproveLevelRate>(0);

    public SysApproveLevel() {
    }

    public SysApproveLevel(SysUserRole sysUserRole, String approvedLevelDescr, Short approvedLevelVal, Set<SaleLoanContract> saleLoanContracts, Set<SysApproveLevelRateVehicleType> sysApproveLevelRateVehicleTypes, Set<SysApproveLevelRate> sysApproveLevelRates) {
       this.sysUserRole = sysUserRole;
       this.approvedLevelDescr = approvedLevelDescr;
       this.approvedLevelVal = approvedLevelVal;
       this.saleLoanContracts = saleLoanContracts;
       this.sysApproveLevelRateVehicleTypes = sysApproveLevelRateVehicleTypes;
       this.sysApproveLevelRates = sysApproveLevelRates;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="APPROVED_LEVEL_NO", unique=true, nullable=false)
    public Short getApprovedLevelNo() {
        return this.approvedLevelNo;
    }
    
    public void setApprovedLevelNo(Short approvedLevelNo) {
        this.approvedLevelNo = approvedLevelNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="APPROVED_LEVEL_ROLE_NO")
    public SysUserRole getSysUserRole() {
        return this.sysUserRole;
    }
    
    public void setSysUserRole(SysUserRole sysUserRole) {
        this.sysUserRole = sysUserRole;
    }

    
    @Column(name="APPROVED_LEVEL_DESCR", length=50)
    public String getApprovedLevelDescr() {
        return this.approvedLevelDescr;
    }
    
    public void setApprovedLevelDescr(String approvedLevelDescr) {
        this.approvedLevelDescr = approvedLevelDescr;
    }

    
    @Column(name="APPROVED_LEVEL_VAL")
    public Short getApprovedLevelVal() {
        return this.approvedLevelVal;
    }
    
    public void setApprovedLevelVal(Short approvedLevelVal) {
        this.approvedLevelVal = approvedLevelVal;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sysApproveLevel")
    public Set<SaleLoanContract> getSaleLoanContracts() {
        return this.saleLoanContracts;
    }
    
    public void setSaleLoanContracts(Set<SaleLoanContract> saleLoanContracts) {
        this.saleLoanContracts = saleLoanContracts;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sysApproveLevel")
    public Set<SysApproveLevelRateVehicleType> getSysApproveLevelRateVehicleTypes() {
        return this.sysApproveLevelRateVehicleTypes;
    }
    
    public void setSysApproveLevelRateVehicleTypes(Set<SysApproveLevelRateVehicleType> sysApproveLevelRateVehicleTypes) {
        this.sysApproveLevelRateVehicleTypes = sysApproveLevelRateVehicleTypes;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sysApproveLevel")
    public Set<SysApproveLevelRate> getSysApproveLevelRates() {
        return this.sysApproveLevelRates;
    }
    
    public void setSysApproveLevelRates(Set<SysApproveLevelRate> sysApproveLevelRates) {
        this.sysApproveLevelRates = sysApproveLevelRates;
    }




}


